#pragma once
#include "Define.h"
#include <string>
#include <map>

class xQbFlagAdd_c;
class xQBFlagsAck_c;

class S_UAM_EXPORT CQBFlags
{
public:
	static const size_t kvsize = 1024;
	static const std::string CommonPageAddedFlag_Key;
	static const std::string CommonPageAddedFlag_Val;

public:
	void Update(xQbFlagAdd_c *pdata);
	void Update(xQBFlagsAck_c *pdata);
	void Clear();
	bool GetValue(const char *pkey, std::string& pvalue);
	bool Initialized(){ return m_bFlagInitialized; }
protected:
	//key-value
	std::map<std::string, std::string> m_data;
	bool m_bFlagInitialized = false;
public:
	static CQBFlags& instance()
	{
		static CQBFlags flags_;
		return flags_;
	}
private:
	CQBFlags() = default;
	~CQBFlags() = default;
};

